Skip to main content

All Questions

1vote
1answer
609views

TypeScript fetch wrapper class with localStorage cache

I'm learning TypeScript while doing my portfolio, and I wrote a class to make a fetch request to the API that holds my data. It is working fine. I use localStorage to set a cache to avoid calling the ...
MauricioRobayo's user avatar
2votes
1answer
88views

Simple local cache that checks by date else get from db

I'm looking for feedback on how this can be improved. Basically what I'm trying to do is check if the cache has the object, else check from the database. I have a list of ids, then I separate them ...
mel3kings's user avatar
5votes
2answers
103views

Apostle Galaxies: dict subclass with disk caching

I am an astrophysicist working on large simulations as part of the APOSTLE project. The output of the simulations I use are large (TBs) and are stored in tables spread across multiple hdf5 files. ...
Kyle's user avatar
  • 153
1vote
1answer
257views

Two (or more) LRU caches for a Node.js app

Here is a caching code of a nodejs / typescript app using lru Cache module from https://www.npmjs.com/package/lru-cache. For various reason i need to setup separate caches: one for homeCache another ...
Robert Brax's user avatar
5votes
5answers
6kviews

Property caching

Trying to figure out how to efficiently cache property calculations with dependency tracking to invalidate the cache. Here is the syntax I have at the moment (one ...
Dmitry Nogin's user avatar
3votes
0answers
133views

Angular OOP services and caching

I've created a caching service using OOP techniques combined with the revealing module pattern and the angular-cache library. New CacheDataClass objects are ...
br3w5's user avatar
4votes
1answer
617views

LRU Cache in ECMAScript

I wrote this for a CodeWars challenge while trying to learn ECMAScript and would really like to have some advice on how it could be improved. What I don't like about this code myself, but am unsure ...
s1lv3r's user avatar
2votes
1answer
363views

In-memory data cache architecture

I am designing a basic in-memory cache storage with a thin CRUD (actually CRD) interface. The design is inspired by backend solutions such as Parse and StackMob. Main characteristics: Cache consists ...
Dmitri Zaitsev's user avatar
3votes
2answers
3kviews

Currency conversion class with caching

I've just made this class, which supports caching. I'd really appreciate any comments on how to make it better etc. Code ...
purpletree's user avatar

close